<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition template="./../template/template_park.xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core">

    <ui:define name="content">
        <h:form>
            <h:messages/>

            <fieldset>
                <legend>Cadastro de Movimentacoes</legend>

                <h:dataTable value="#{movimentacaoMB.movimentacaoListDataModel}" var="movimentacao" style="border-style: solid; border-width: 2px;">
                    <h:column>
                        <f:facet name="header"><h:outputText value="USUARIO"/></f:facet>
                        <h:outputText value="#{movimentacao.usuario.nome}"/>
                    </h:column>
                    <h:column>
                        <f:facet name="header"><h:outputText value="CPF"/></f:facet>
                        <h:outputText value="#{movimentacao.usuario.cpf}"/>
                    </h:column>
                    <h:column>
                        <f:facet name="header"><h:outputText value="TIPO VEICULO"/></f:facet>
                        <h:outputText value="#{movimentacao.tipoVeiculo}"/>
                    </h:column>
                    <h:column>
                        <f:facet name="header"><h:outputText value="PLACA"/></f:facet>
                        <h:outputText value="#{movimentacao.placaVeiculo}"/>
                    </h:column>
                    <h:column>
                        <f:facet name="header"><h:outputText value="DATA ENTRADA"/></f:facet>
                        <h:outputText value="#{movimentacao.dtEntrada}"/>
                    </h:column>
                    <h:column>
                        <f:facet name="header"><h:outputText value="DATA SAIDA"/></f:facet>
                        <h:outputText value="#{movimentacao.dtSaida}"/>
                    </h:column>

                    <h:column>
                        <h:commandButton value="Excluir" action="#{movimentacaoMB.remover}"/>
                    </h:column>
                </h:dataTable>

                <h:commandButton value="Voltar" action="#{movimentacaoMB.voltarConsulta}"/>
            </fieldset>
        </h:form>
    </ui:define>
</ui:composition>
